package com.ruoyi.hospital.service.member.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.member.MemberFollowMapper;
import com.ruoyi.hospital.domain.member.MemberFollow;
import com.ruoyi.hospital.service.member.IMemberFollowService;

/**
 * 用户关注医生Service业务层处理
 * 
 * @author wendao
 * @date 2024-12-10
 */
@Service
public class MemberFollowServiceImpl implements IMemberFollowService 
{
    @Autowired
    private MemberFollowMapper memberFollowMapper;

    /**
     * 查询用户关注医生
     * 
     * @param id 用户关注医生主键
     * @return 用户关注医生
     */
    @Override
    public MemberFollow selectMemberFollowById(Integer id)
    {
        return memberFollowMapper.selectMemberFollowById(id);
    }

    /**
     * 查询用户关注医生列表
     * 
     * @param memberFollow 用户关注医生
     * @return 用户关注医生
     */
    @Override
    public List<MemberFollow> selectMemberFollowList(MemberFollow memberFollow)
    {
        return memberFollowMapper.selectMemberFollowList(memberFollow);
    }

    /**
     * 新增用户关注医生
     * 
     * @param memberFollow 用户关注医生
     * @return 结果
     */
    @Override
    public int insertMemberFollow(MemberFollow memberFollow)
    {
        memberFollow.setCreateTime(DateUtils.getNowTimeSecond());
        return memberFollowMapper.insertMemberFollow(memberFollow);
    }

    /**
     * 修改用户关注医生
     * 
     * @param memberFollow 用户关注医生
     * @return 结果
     */
    @Override
    public int updateMemberFollow(MemberFollow memberFollow)
    {
        memberFollow.setUpdateTime(DateUtils.getNowTimeSecond());
        return memberFollowMapper.updateMemberFollow(memberFollow);
    }

    /**
     * 批量删除用户关注医生
     * 
     * @param ids 需要删除的用户关注医生主键
     * @return 结果
     */
    @Override
    public int deleteMemberFollowByIds(Integer[] ids)
    {
        return memberFollowMapper.deleteMemberFollowByIds(ids);
    }

    /**
     * 删除用户关注医生信息
     * 
     * @param id 用户关注医生主键
     * @return 结果
     */
    @Override
    public int deleteMemberFollowById(Integer id)
    {
        return memberFollowMapper.deleteMemberFollowById(id);
    }
}
